#include "hypercube/hypercube_cryto_agent.hpp"

unsigned long m;
unsigned long n;
unsigned long k;

bool linear = false;
bool cache_free = false;
bool minimal = false;

int main(int argc, char **argv) {
  params<helib::BGV> params;
  command_line_parser parser(params);
  parser.add_option("-m", "4", "m", &m);
  parser.add_option("-n", "4", "n", &n);
  parser.add_option("-k", "4", "k", &k);
  parser.add_option("-1d", "use_linear", &linear);
  parser.add_option("-nocache", "always_build_context", &cache_free);
  parser.add_option("-minimal", "find_minimal_m", &minimal);
  int ret = parser.parse(argc, argv);

  const long h_nrow = std::max(m, k);
  const long h_ncol = std::max(k, n);
  cube_signature cube;
  if (linear) {
    cube.init({h_nrow * h_ncol});
  } else {
    cube.init({h_nrow, h_ncol});
  }

  hypercube_hmmcs hmmsc(params, cube, cache_free, minimal);
  hmmsc.report_context();
  std::cout << "================== Params Test Report =================\n";
  hmmsc.report_time();
  std::cout << "=======================================================\n";
  return ret;
}